<template>
	<view style="padding-bottom: 120rpx;">
		<view class="header">
			<u-navbar title="开店" :border-bottom='false' back-icon-size='48' title-color='#FFFFFF'
				back-icon-color='#FFFFFF' :background='background'></u-navbar>
			<view class="contBox">
				<view class="name">
					<image src="../../../static/imgs/jisukaidian.png" mode=""></image>
				</view>
				<view class="tip">
					<image src="../../../static/imgs/tipicon.png" mode=""></image>
				</view>
				<view class="step">
					<view class="step-li">
						<text>填写</text>
						<text>信息</text>
					</view>
					<view class="next">
						<image src="../../../static/imgs/jiantou.png" mode=""></image>
					</view>
					<view class="step-li">
						<text>提交</text>
						<text>审核</text>
					</view>
					<view class="next">
						<image src="../../../static/imgs/jiantou.png" mode=""></image>
					</view>
					<view class="step-li">
						<text>开店</text>
						<text>成功</text>
					</view>
				</view>
			</view>
		</view>
		<view class="textBox">
			<view class="title">
				开店要求
			</view>
			<view class="text">
				入驻基础要求
			</view>
			<view class="tip">
				1、需要有线下实体店铺
			</view>
			<view class="tip">
				2、必须有i世界平台的门店经销商资格
			</view>
			<view class="tip">
				3、提供门店信息(包含门头图照片)
			</view>
			<view class="text">
				入驻资质要求
			</view>
			<view class="tip">
				需要提供以下资料:营业执照“三证合一”复印件、法定代表人身份证正反面复印件、银行开户许可证、品牌商标证明、以及符合国家法律规定的经营许可证照等。所有资质均需真实有效且正规。
			</view>
			<view class="text">
				入驻品类范围
			</view>
			<view class="tip">
				美容美发、健身房、洗浴中心、养生会所、美甲、美食酒店民宿、休闲玩乐、电影演出、学习培训、医疗口腔宠物、亲子乐园、婚纱摄影、家居维修、服饰箱包
			</view>
			<view class="text">
				资费说明
			</view>
			<view class="tip">
				实体门店上线后，商家入驻的收入，平台会收取一定比例的服务费，费用细节以商家和平台最后协商确定为准。
			</view>
			<view class="text">
				入驻须知
			</view>
			<view class="tip">
				入驻门店须遵守i世界平台管理规范，对于违反平台规则的门店，平台将给予门店违规处理。严重违规的门店，i世界商城有权清退。
			</view>
		</view>
		<view class="btnBox">
			<view class="btn" @click="next">
				申请开店
			</view>
		</view>
	</view>
</template>

<script>
	import myRequest from '@/api/index.js'
	export default {
		data() {
			return {
				background: {
					backgroundColor: 'rgba(102, 181, 250,1)'
				},
				status: 0, // 审核状态
			}
		},
		onLoad() {
			this.getMystore()
		},
		methods: {
			async getMystore() {
				let res = await myRequest.getMyshop()
				if (res.status) {
					// 已审核通过
					uni.navigateTo({
						url: '../myShop/myShop'
					})
				} else {
					this.status = res.code
				}
			},
			next() {
				let {
					status
				} = this
				if (status == 3) {
					uni.showToast({
						title: '店铺审核中,无需重复开店',
						icon: 'none'
					})
					return
				}
				uni.navigateTo({
					url: './step/stepOne'
				})
			}
		}
	}
</script>

<style>
	page {
		background-color: #FFFFFF;
	}
</style>

<style lang="scss" scoped>
	.header {
		width: 100%;
		height: 486rpx;
		@include bgi('../../../static/imgs/kaidianbgi.png');

		.contBox {
			width: 100%;

			.name {
				margin: 0 auto;
				width: 264rpx;
				height: 94rpx;

				image {
					width: 100%;
					height: 100%;
				}
			}

			.tip {
				margin: 0 auto;
				width: 588rpx;
				height: 54rpx;

				image {
					width: 100%;
					height: 100%;
				}
			}

			.step {
				margin-top: 20rpx;
				display: flex;
				align-items: center;
				justify-content: space-evenly;

				.step-li {
					width: 100rpx;
					height: 100rpx;
					@include bgi('../../../static/imgs/yuanIcon.png');
					font-size: 24rpx;
					font-family: PingFang SC;
					font-weight: 400;
					color: #3587F7;
					display: flex;
					flex-direction: column;
					align-items: center;
					justify-content: center;
				}

				.next {
					image {
						width: 44rpx;
						height: 16rpx;
					}
				}
			}
		}
	}

	.textBox {
		margin-top: 46rpx;
		padding: 0 20rpx;

		.title {
			width: 100%;
			font-size: 34rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #3587F7;
			display: flex;
			align-items: center;
			justify-content: center;

			&::before {
				content: '';
				width: 33px;
				height: 0px;
				border: 1px solid #3587F7;
				margin-right: 20rpx;
			}

			&::after {
				content: '';
				width: 33px;
				height: 0px;
				border: 1px solid #3587F7;
				margin-left: 20rpx;
			}
		}

		.text {
			font-size: 28rpx;
			font-family: PingFang SC;
			font-weight: 600;
			color: #333333;
			margin: 10rpx 0;
		}

		.tip {
			font-size: 28rpx;
			font-family: PingFang SC;
			font-weight: 400;
			color: #666666;
			line-height: 48rpx;
		}
	}

	.btnBox {
		width: 100%;
		height: 100rpx;
		background-color: #FFFFFF;
		position: fixed;
		bottom: 0;

		.btn {
			margin: 0 auto;
			width: 670rpx;
			height: 100rpx;
			background: linear-gradient(180deg, #3FA3F9 0%, #2D7BF7 100%);
			border-radius: 16rpx;
			font-size: 36rpx;
			font-family: PingFangSC-Medium;
			color: #FFFFFF;
			text-align: center;
			line-height: 100rpx;
		}
	}
</style>
